package com.CTAtracker.android.DataBase;

import android.content.ContentValues;
import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteException;

public class MySQLiteHelperStation extends MySQLiteHelper {

	/**
	 * The name of the table Station 
	 */
	public static final String TABLE_STATION = "stations";
	/**
	 * The name of the database field : _idStation
	 */
	public static final String STATION_ID = 			"_idStation";
	/**
	 * The name of the database field : name
	 */
	public static final String STATION_NAME = 			"name";
	/**
	 * The name of the database field : stopId
	 */
	public static final String STATION_STOP_ID = 		"stop_id";
	/**
	 * The name of the database field : stop_name
	 */
	public static final String STATION_STOP_NAME = 		"stop_name";
	/**
	 * The name of the database field : direction
	 */
	public static final String STATION_DIRECTION = 		"direction";
	/**
	 * The name of the database field : longitude
	 */
	public static final String STATION_LON = 			"longitude";
	/**
	 * The name of the database field : latitude
	 */
	public static final String STATION_LAT = 			"latitude";
	/**
	 * The name of the database field : ADA
	 */
	public static final String STATION_ADA = 			"ADA";
	/**
	 * The name of the database field : parent_stop_id
	 */
	public static final String STATION_PARENT_STOP_ID = "parent_stop_id";
	/**
	 * The name of the database field : line_id
	 */
	public static final String STATION_LINE_ID = 		"line_id";
	/**
	 * Number to sort line for Gmaps
	 */
	public static final String STATION_SORT = 			"sort_map";
	/**
	 * A string array of all the fields in the table
	 */
	public static final String[] allColumns = { 
			STATION_ID,
			STATION_NAME ,
			STATION_STOP_ID, 
			STATION_STOP_NAME, 
			STATION_DIRECTION, 
			STATION_LON, 
			STATION_LAT, 
			STATION_ADA, 
			STATION_PARENT_STOP_ID, 
			STATION_LINE_ID};
	/**
	 * A string array of few fields in the table : 
	 * station_id, station_name, longitude, latitude
	 * ADA, parent_stop_id, line_id
	 */
	public static final  String[] columnsStation = { 
			STATION_ID,
			STATION_NAME ,
			STATION_LON, 
			STATION_LAT, 
			STATION_ADA, 
			STATION_PARENT_STOP_ID, 
			STATION_LINE_ID};

	/**
	 * A string array of the fields stop_id in the table
	 */
	public static final  String[] columnIdStop = {
			STATION_STOP_ID	
	};
	/**
	 * A string array of the fields stop_id in the table
	 */
	public static final  String[] columnIdLine = {
			STATION_LINE_ID	
	};
	/**
	 * The id of the red Line
	 */
	private final static int RED = 1;
	/**
	 * The id of the blue Line
	 */
	private final static int BLUE = 2;
	/**
	 * The id of the green Line
	 */
	private final static int GREEN = 3;
	/**
	 * The id of the brown Line
	 */
	private final static int BROWN = 4;
	/**
	 * The id of the orange Line
	 */
	private final static int ORANGE = 5;
	/**
	 * The id of the pink Line
	 */
	private final static int PINK = 6;
	/**
	 * The id of the purple Line
	 */
	private final static int PURPLE = 7;
	/**
	 * The id of the yellow Line
	 */
	private final static int YELLOW = 8;
	/**
	 * The id of the congress Line
	 */
	//private final int CONGRESS = 9; 
	/**
	 * The query to create the database
	 */
	public static final String DATABASE_CREATE_STATION = "create table " + TABLE_STATION + " (" 
			+ STATION_ID 			 + " integer primary key autoincrement, " 
			+ STATION_NAME 			 + " text not null, "
			+ STATION_STOP_ID 		 + " integer, " 
			+ STATION_STOP_NAME 	 + " text not null, " 
			+ STATION_DIRECTION 	 + " text not null, " 
			+ STATION_LON 			 + " real, " 
			+ STATION_LAT 			 + " real, " 
			+ STATION_ADA 			 + " integer, " 
			+ STATION_PARENT_STOP_ID + " integer, " 
			+ STATION_LINE_ID 		 + " integer, "
			+ STATION_SORT + " integer);";

	/**
	 * Constructor, Instantiate the database with the method super
	 * @param context
	 */
	public MySQLiteHelperStation(Context context) {
		super(context);
	}

	/**
	 * This method is called the first time we create the database
	 */
	@Override
	public void onCreate(SQLiteDatabase db) {
		MySQLiteHelperLine.createData(db); 
		MySQLiteHelperStation.createData(db);
		MySQLiteHelperFavorite.createData(db);
	}

	/**
	 * Create the query to insert a new Station in the database
	 * @param database the database to use
	 * @param name the name of the station 
	 * @param stop_id the stop id of the station 
	 * @param stop_name the stop name of the station 
	 * @param direction the direction of the station 
	 * @param longitude the longitude of the station 
	 * @param latitude the latitude of the station 
	 * @param ADA the ADA of the station 
	 * @param parent_stop_id the parent stop id of the station 
	 * @param line_id the line id of the station 
	 * @throws SQLiteException
	 */
	public static void createStation(SQLiteDatabase database, 	
			String name, int stop_id, String stop_name, String direction,
			double longitude, double latitude, int ADA, int parent_stop_id,
			int line_id, int sort) throws SQLiteException {

		ContentValues values = new ContentValues();

		values.put(MySQLiteHelperStation.STATION_NAME, name);
		values.put(MySQLiteHelperStation.STATION_STOP_ID, stop_id);
		values.put(MySQLiteHelperStation.STATION_STOP_NAME, stop_name);
		values.put(MySQLiteHelperStation.STATION_DIRECTION, direction);
		values.put(MySQLiteHelperStation.STATION_LON, longitude);
		values.put(MySQLiteHelperStation.STATION_LAT, latitude);
		values.put(MySQLiteHelperStation.STATION_ADA, ADA);
		values.put(MySQLiteHelperStation.STATION_PARENT_STOP_ID, parent_stop_id);
		values.put(MySQLiteHelperStation.STATION_LINE_ID, line_id);
		values.put(MySQLiteHelperStation.STATION_SORT, sort);

		if (database.insert(TABLE_STATION, null, values) == -1)
			throw new SQLiteException();
	}

	/**
	 * This method is called by the method onCreate. Create the table station and insert the data in the table
	 * @param db
	 */
	public static void createData(SQLiteDatabase db) {
		db.execSQL(DATABASE_CREATE_STATION);
		// creation of the data
		createStationRedLine(db);
		createStationBlueLine(db);
		createStationGreenLine(db);
		createStationBrownLine(db);
		createStationOrangeLine(db);
		createStationPinkLine(db);
		createStationPurpleLine(db);
		createStationYellowLine(db);
	}
	
	/**
	 * Create in the database, the data regarding the Yellow Line 
	 * @param db
	 */

	private static void createStationYellowLine(SQLiteDatabase db) {
		createStation(db,"Howard", 30175, "Howard (NB)(Linden, Skokie-bound)","N",-87.672892, 42.019063, 1,40900,YELLOW,0);
		createStation(db,"Howard", 30176, "Howard (Terminal arrival)","S",-87.672892, 42.019063, 1,40900,YELLOW,0);
		createStation(db,"Oakton-Skokie", 30297, "Oakton (Dempster-Skokie-bound)","N",-87.74722084, 42.02624348, 1,41680,YELLOW,1);
		createStation(db,"Oakton-Skokie", 30298, "Oakton (Howard-bound)","S",-87.74722084, 42.02624348, 1,41680,YELLOW,1);
		createStation(db,"Skokie", 30026, "Skokie (Arrival)","N",-87.751919, 42.038951, 1,40140,YELLOW,2);
		createStation(db,"Skokie", 30027, "Skokie (Howard-bound)","S",-87.751919, 42.038951, 1,40140,YELLOW,2);
	}
	
	/**
	 * Create in the database, the data regarding the Purple Line 
	 * @param db
	 */

	private static void createStationPurpleLine(SQLiteDatabase db) {
		createStation(db,"Adams/Wabash", 30132, "Adams/Wabash (Inner Loop)","S",-87.626037, 41.879507, 0,40680,PURPLE,22);
		createStation(db,"Adams/Wabash", 30131, "Adams/Wabash (Outer Loop)","N",-87.626037, 41.879507, 0,40680,PURPLE,22);
		createStation(db,"Armitage", 30127, "Armitage (Kimball-Linden-bound)","N",-87.652644, 41.918217, 1,40660,PURPLE,14);
		createStation(db,"Armitage", 30128, "Armitage (Loop-bound)","S",-87.652644, 41.918217, 1,40660,PURPLE,14);
		createStation(db,"Belmont", 30256, "Belmont (Loop-bound)","S",-87.65338, 41.939751, 1,41320,PURPLE,10);
		createStation(db,"Belmont", 30255, "Belmont (Kimball-Linden-bound)","N",-87.65338, 41.939751, 1,41320,PURPLE,10);
		createStation(db,"Central", 30242, "Central-Evanston (Howard-Loop-bound)","S",-87.685617, 42.063987, 0,41250,PURPLE,1);
		createStation(db,"Central", 30241, "Central-Evanston (Linden-bound)","N",-87.685617, 42.063987, 0,41250,PURPLE,1);
		createStation(db,"Chicago", 30137, "Chicago/Franklin (Kimball-Linden-bound)","N",-87.635924, 41.89681, 1,40710,PURPLE,16);
		createStation(db,"Chicago", 30138, "Chicago/Franklin (Loop-bound)","S",-87.635924, 41.89681, 1,40710,PURPLE,16);
		createStation(db,"Clark/Lake", 30074, "Clark/Lake (Inner Loop)","E",-87.630886, 41.885737, 1,40380,PURPLE,18);
		createStation(db,"Clark/Lake", 30075, "Clark/Lake (Outer Loop)","W",-87.630886, 41.885737, 1,40380,PURPLE,18);
		createStation(db,"Davis", 30011, "Davis (Howard-Loop-bound)","S",-87.683543, 42.04771, 1,40050,PURPLE,4);
		createStation(db,"Davis", 30010, "Davis (Linden-bound)","N",-87.683543, 42.04771, 1,40050,PURPLE,4);
		createStation(db,"Dempster", 30134, "Dempster (Howard-Loop-bound)","S",-87.681602, 42.041655, 0,40690,PURPLE,5);
		createStation(db,"Dempster", 30133, "Dempster (Linden-bound)","N",-87.681602, 42.041655, 0,40690,PURPLE,5);
		createStation(db,"Diversey", 30103, "Diversey (Kimball-Linden-bound)","N",-87.653131, 41.932732, 1,40530,PURPLE,12);
		createStation(db,"Diversey", 30104, "Diversey (Loop-bound)","S",-87.653131, 41.932732, 1,40530,PURPLE,12);
		createStation(db,"Foster", 30102, "Foster (Howard-Loop-bound)","S",-87.68356, 42.05416, 0,40520,PURPLE,3);
		createStation(db,"Foster", 30101, "Foster (Linden-bound)","N",-87.68356, 42.05416, 0,40520,PURPLE,3);
		createStation(db,"Fullerton", 30235, "Fullerton (Kimball-Linden-bound)","N",-87.652866, 41.925051, 1,41220,PURPLE,13);
		createStation(db,"Fullerton", 30236, "Fullerton (Loop-bound)","S",-87.652866, 41.925051, 1,41220,PURPLE,13);
		createStation(db,"Harold Washington Library-State/Van Buren", 30166, "Library (Inner Loop)","W",-87.628196, 41.876862, 1,40850,PURPLE,23);
		createStation(db,"Harold Washington Library-State/Van Buren", 30165, "Library (Outer Loop)","E",-87.628196, 41.876862, 1,40850,PURPLE,23);
		createStation(db,"Howard", 30175, "Howard (Linden, Skokie-bound)","N",-87.672892, 42.019063, 1,40900,PURPLE,8);
		createStation(db,"Howard", 30176, "Howard (Terminal arrival)","S",-87.672892, 42.019063, 1,40900,PURPLE,8);
		createStation(db,"LaSalle/Van Buren", 30031, "LaSalle/Van Buren (Inner Loop)","W",-87.631739, 41.8768, 0,40160,PURPLE,24);
		createStation(db,"LaSalle/Van Buren", 30030, "LaSalle/Van Buren (Outer Loop)","E",-87.631739, 41.8768, 0,40160,PURPLE,24);
		createStation(db,"Linden", 30204, "Linden (Howard-Loop-bound)","S",-87.69073, 42.073153, 1,41050,PURPLE,0);
		createStation(db,"Linden", 30203, "Linden (Linden-bound)","N",-87.69073, 42.073153, 1,41050,PURPLE,0);
		createStation(db,"Madison/Wabash", 30124, "Madison/Wabash (Inner Loop)","S",-87.626098, 41.882023, 0,40640,PURPLE,21);
		createStation(db,"Madison/Wabash", 30123, "Madison/Wabash (Outer Loop)","N",-87.626098, 41.882023, 0,40640,PURPLE,21);
		createStation(db,"Main", 30053, "Main (Howard-Loop-bound)","S",-87.679538, 42.033456, 0,40270,PURPLE,6);
		createStation(db,"Main", 30052, "Main (Linden-bound)","N",-87.679538, 42.033456, 0,40270,PURPLE,6);
		createStation(db,"Merchandise Mart", 30090, "Merchandise Mart (Kimball-Linden-bound)","N",-87.633924, 41.888969, 1,40460,PURPLE,17);
		createStation(db,"Merchandise Mart", 30091, "Merchandise Mart (Loop-bound)","S",-87.633924, 41.888969, 1,40460,PURPLE,17);
		createStation(db,"Noyes", 30079, "Noyes (Howard-Loop-bound)","S",-87.683337, 42.058282, 0,40400,PURPLE,2);
		createStation(db,"Noyes", 30078, "Noyes (Linden-bound)","N",-87.683337, 42.058282, 0,40400,PURPLE,2);
		createStation(db,"Quincy/Wells", 30007, "Quincy/Wells (Inner Loop)","N",-87.63374, 41.878723, 0,40040,PURPLE,25);
		createStation(db,"Quincy/Wells", 30008, "Quincy/Wells (Outer Loop)","S",-87.63374, 41.878723, 0,40040,PURPLE,25);
		createStation(db,"Randolph/Wabash", 30039, "Randolph/Wabash (Inner Loop)","S",-87.626149, 41.884431, 0,40200,PURPLE,20);
		createStation(db,"Randolph/Wabash", 30038, "Randolph/Wabash (Outer Loop)","N",-87.626149, 41.884431, 0,40200,PURPLE,20);
		createStation(db,"Sedgwick", 30155, "Sedgwick (Kimball-Linden-bound)","N",-87.639302, 41.910409, 1,40800,PURPLE,15);
		createStation(db,"Sedgwick", 30156, "Sedgwick (Loop-bound)","S",-87.639302, 41.910409, 1,40800,PURPLE,15);
		createStation(db,"South Boulevard", 30164, "South Blvd (Howard-Loop-bound)","S",-87.678329, 42.027612, 0,40840,PURPLE,7);
		createStation(db,"South Boulevard", 30163, "South Blvd (Linden-bound)","N",-87.678329, 42.027612, 0,40840,PURPLE,7);
		createStation(db,"State/Lake", 30050, "State/Lake (Inner Loop)","E",-87.627835, 41.88574, 0,40260,PURPLE,19);
		createStation(db,"State/Lake", 30051, "State/Lake (Outer Loop)","W",-87.627835, 41.88574, 0,40260,PURPLE,19);
		createStation(db,"Washington/Wells", 30141, "Washington/Wells (Inner Loop)","N",-87.63378, 41.882695, 1,40730,PURPLE,26);
		createStation(db,"Washington/Wells", 30142, "Washington/Wells (Outer Loop)","S",-87.63378, 41.882695, 1,40730,PURPLE,26);
		createStation(db,"Wellington", 30231, "Wellington (Kimball-Linden-bound)","N",-87.653266, 41.936033, 1,41210,PURPLE,11);
		createStation(db,"Wellington", 30232, "Wellington (Loop-bound)","S",-87.653266, 41.936033, 1,41210,PURPLE,11);
		createStation(db,"Sheridan", 30293, "Sheridan (Howard-Linden-bound)","N",-87.654929, 41.953775, 0,40080,PURPLE, 9);
		createStation(db,"Sheridan", 30294, "Sheridan (Loop-bound)","S",-87.654929, 41.953775, 0,40080,PURPLE, 9);
		
	}
	
	/**
	 * Create in the database, the data regarding the Pink Line 
	 * @param db
	 */

	private static void createStationPinkLine(SQLiteDatabase db) {
		createStation(db, "18th", 30162, "18th (54th/Cermark-bound)", "W", -87.669147, 41.857908, 1, 40830, PINK,10);
		createStation(db, "18th", 30161, "18th (Loop-bound)", "E", -87.669147, 41.857908, 1, 40830, PINK,10);
		createStation(db, "54th/Cermak", 30113, "54th/Cermak (Loop-bound)", "E", -87.75669201, 41.85177331, 1, 40580, PINK,1);
		createStation(db, "54th/Cermak", 30114, "54th/Cermak (Terminal arrival)", "W", -87.75669201, 41.85177331, 1, 40580, PINK,1);
		createStation(db,"Adams/Wabash", 30132, "Adams/Wabash (Inner Loop)","S",-87.626037, 41.879507, 0,40680,PINK,19);
		createStation(db,"Adams/Wabash", 30131, "Adams/Wabash (Outer Loop)","N",-87.626037, 41.879507, 0,40680,PINK,19);
		createStation(db,"Ashland", 30032, "Ashland (Harlem-54th/Cermak-bound)","E",-87.666969, 41.885269, 1,40170,PINK,12);
		createStation(db,"Ashland", 30033, "Ashland (Loop-63rd-bound)","W",-87.666969, 41.885269, 1,40170,PINK,12);
		createStation(db,"Western", 30144, "Western (54th/Cermak-bound)","W",-87.685129, 41.854225, 1,40740,PINK,8);
		createStation(db,"Western", 30143, "Western (Loop-bound)","E",-87.685129, 41.854225, 1,40740,PINK,8);
		createStation(db,"Washington/Wells", 30141, "Washington/Wells (Inner Loop)","N",-87.63378, 41.882695, 1,40730,PINK,23);
		createStation(db,"Washington/Wells", 30142, "Washington/Wells (Outer Loop)","S",-87.63378, 41.882695, 1,40730,PINK,23);
		createStation(db,"State/Lake", 30050, "State/Lake (Inner Loop)","E",-87.627835, 41.88574, 0,40260,PINK,16);
		createStation(db,"State/Lake", 30051, "State/Lake (Outer Loop)","W",-87.627835, 41.88574, 0,40260,PINK,16);
		createStation(db,"Randolph/Wabash", 30039, "Randolph/Wabash (Inner Loop)","S",-87.626149, 41.884431, 0,40200,PINK,17);
		createStation(db,"Randolph/Wabash", 30038, "Randolph/Wabash (Outer Loop)","N",-87.626149, 41.884431, 0,40200,PINK,17);
		createStation(db,"Quincy/Wells", 30007, "Quincy/Wells (Inner Loop)","N",-87.63374, 41.878723, 0,40040,PINK,22);
		createStation(db,"Quincy/Wells", 30008, "Quincy/Wells (Outer Loop)","S",-87.63374, 41.878723, 0,40040,PINK,22);
		createStation(db,"Pulaski", 30029, "Pulaski (54th/Cermak-bound)","W",-87.724311, 41.853732, 1,40150,PINK,4);
		createStation(db,"Pulaski", 30028, "Pulaski (Loop-bound)","E",-87.724311, 41.853732, 1,40150,PINK,4);
		createStation(db,"Polk", 30200, "Polk (54th/Cermak-bound)","W",-87.66953, 41.871551, 1,41030,PINK,11);
		createStation(db,"Polk", 30199, "Polk (Loop-bound)","E",-87.66953, 41.871551, 1,41030,PINK,11);
		createStation(db,"Morgan", 30296, "Morgan (Harlem-54th/Cermak-bound)","W",-87.652193, 41.885586, 1,41510,PINK,13);
		createStation(db,"Morgan", 30295, "Morgan (Loop-63rd-bound)","E",-87.652193, 41.885586, 1,41510,PINK,13);
		createStation(db,"Madison/Wabash", 30124, "Madison/Wabash (Inner Loop)","S",-87.626098, 41.882023, 0,40640,PINK,18);
		createStation(db,"Madison/Wabash", 30123, "Madison/Wabash (Outer Loop)","N",-87.626098, 41.882023, 0,40640,PINK,18);
		createStation(db,"LaSalle/Van Buren", 30031, "LaSalle/Van Buren (Inner Loop)","W",-87.631739, 41.8768, 0,40160,PINK,21);
		createStation(db,"LaSalle/Van Buren", 30030, "LaSalle/Van Buren (Outer Loop)","E",-87.631739, 41.8768, 0,40160,PINK,21);
		createStation(db,"Kostner", 30118, "Kostner (54th/Cermak-bound)","W",-87.733258, 41.853751, 1,40600,PINK,3);
		createStation(db,"Kostner", 30117, "Kostner (Loop-bound)","E",-87.733258, 41.853751, 1,40600,PINK,3);
		createStation(db,"Kedzie", 30202, "Kedzie (54th/Cermak-bound)","W",-87.705408, 41.853964, 1,41040,PINK,6);
		createStation(db,"Kedzie", 30201, "Kedzie (Loop-bound)","E",-87.705408, 41.853964, 1,41040,PINK,6);
		createStation(db,"Harold Washington Library-State/Van Buren", 30166, "Library (Inner Loop)","W",-87.628196, 41.876862, 1,40850,PINK,20);
		createStation(db,"Harold Washington Library-State/Van Buren", 30165, "Library (Outer Loop)","E",-87.628196, 41.876862, 1,40850,PINK,20);
		createStation(db,"California", 30087, "California (54th/Cermak-bound)","W",-87.694774, 41.854109, 1,40440,PINK,7);
		createStation(db,"California", 30086, "California (Loop-bound)","E",-87.694774, 41.854109, 1,40440,PINK,7);
		createStation(db,"Central Park", 30152, "Central Park (54th/Cermak-bound)","W",-87.714842, 41.853839, 1,40780,PINK,5);
		createStation(db,"Central Park", 30151, "Central Park (Loop-bound)","E",-87.714842, 41.853839, 1,40780,PINK,5);
		createStation(db,"Cicero", 30082, "Cicero (Loop-bound)","E",-87.745336, 41.85182, 1,40420,PINK,2);
		createStation(db,"Cicero", 30083, "Cicero (54th/Cermak-bound)","W",-87.745336, 41.85182, 1,40420,PINK, 2);
		createStation(db,"Clark/Lake", 30074, "Clark/Lake (Inner Loop)","E",-87.630886, 41.885737, 1,40380,PINK,15);
		createStation(db,"Clark/Lake", 30075, "Clark/Lake (Outer Loop)","W",-87.630886, 41.885737, 1,40380,PINK,15);
		createStation(db,"Clinton", 30222, "Clinton (Harlem-54th/Cermak-bound)","W",-87.641782, 41.885678, 1,41160,PINK,14);
		createStation(db,"Clinton", 30221, "Clinton (Loop-63rd-bound)","E",-87.641782, 41.885678, 1,41160,PINK,14);
		createStation(db,"Damen", 30041, "Damen (54th/Cermak-bound)","W",-87.675975, 41.854517, 1,40210,PINK,9);
		createStation(db,"Damen", 30040, "Damen (Loop-bound)","E",-87.675975, 41.854517, 1,40210,PINK,9);
	}
	

	/**
	 * Create in the database, the data regarding the Orange Line 
	 * @param db
	 */
	private static void createStationOrangeLine(SQLiteDatabase db) {
		createStation(db, "35th/Archer", 30022, "35th/Archer (Loop-bound)", "N", -87.680622, 41.829353, 1, 40120, ORANGE,5);
		createStation(db, "35th/Archer", 30023, "35th/Archer (Midway-bound)", "S", -87.680622, 41.829353, 1, 40120, ORANGE,5);
		createStation(db,"Adams/Wabash", 30132, "Adams/Wabash (Inner Loop)","S",-87.626037, 41.879507, 0,40680,ORANGE,17);
		createStation(db,"Adams/Wabash", 30131, "Adams/Wabash (Outer Loop)","N",-87.626037, 41.879507, 0,40680,ORANGE,17);
		createStation(db,"Ashland", 30205, "Ashland (Loop-bound)","N",-87.665317, 41.839234, 1,41060,ORANGE,6);
		createStation(db,"Ashland", 30206, "Ashland (Midway-bound)","S",-87.665317, 41.839234, 1,41060,ORANGE,6);
		createStation(db,"Clark/Lake", 30074, "Clark/Lake (Inner Loop)","E",-87.630886, 41.885737, 1,40380,ORANGE,13);
		createStation(db,"Clark/Lake", 30075, "Clark/Lake (Outer Loop)","W",-87.630886, 41.885737, 1,40380,ORANGE,13);
		createStation(db,"Halsted", 30215, "Halsted (Loop-bound)","N",-87.648088, 41.84678, 1,41130,ORANGE,7);
		createStation(db,"Halsted", 30216, "Halsted (Midway-bound)","S",-87.648088, 41.84678, 1,41130,ORANGE,7);
		createStation(db,"Harold Washington Library-State/Van Buren", 30166, "Library (Inner Loop)","W",-87.628196, 41.876862, 1,40850,ORANGE,9);
		createStation(db,"Harold Washington Library-State/Van Buren", 30165, "Library (Outer Loop)","E",-87.628196, 41.876862, 1,40850,ORANGE,9);
		createStation(db,"Kedzie", 30219, "Kedzie (Loop-bound)","N",-87.704406, 41.804236, 1,41150,ORANGE,3);
		createStation(db,"Kedzie", 30220, "Kedzie (Midway-bound)","S",-87.704406, 41.804236, 1,41150,ORANGE,3);
		createStation(db,"LaSalle/Van Buren", 30031, "LaSalle/Van Buren (Inner Loop)","W",-87.631739, 41.8768, 0,40160,ORANGE,10);
		createStation(db,"LaSalle/Van Buren", 30030, "LaSalle/Van Buren (Outer Loop)","E",-87.631739, 41.8768, 0,40160,ORANGE,10);
		createStation(db,"Madison/Wabash", 30124, "Madison/Wabash (Inner Loop)","S",-87.626098, 41.882023, 0,40640,ORANGE,16);
		createStation(db,"Madison/Wabash", 30123, "Madison/Wabash (Outer Loop)","N",-87.626098, 41.882023, 0,40640,ORANGE,16);
		createStation(db,"Midway", 30182, "Midway (Arrival)","S",-87.737875, 41.78661, 1,40930,ORANGE,1);
		createStation(db,"Midway", 30181, "Midway (Loop-bound)","N",-87.737875, 41.78661, 1,40930,ORANGE,1);
		createStation(db,"Pulaski", 30185, "Pulaski (Loop-bound)","N",-87.724493, 41.799756, 1,40960,ORANGE,2);
		createStation(db,"Pulaski", 30186, "Pulaski (Midway-bound)","S",-87.724493, 41.799756, 1,40960,ORANGE,2);
		createStation(db,"Quincy/Wells", 30007, "Quincy/Wells (Inner Loop)","N",-87.63374, 41.878723, 0,40040,ORANGE,11);
		createStation(db,"Quincy/Wells", 30008, "Quincy/Wells (Outer Loop)","S",-87.63374, 41.878723, 0,40040,ORANGE,11);
		createStation(db,"Randolph/Wabash", 30039, "Randolph/Wabash (Inner Loop)","S",-87.626149, 41.884431, 0,40200,ORANGE,15);
		createStation(db,"Randolph/Wabash", 30038, "Randolph/Wabash (Outer Loop)","N",-87.626149, 41.884431, 0,40200,ORANGE,15);
		createStation(db,"Roosevelt", 30080, "Roosevelt/Wabash (Loop-Harlem-bound)","N",-87.62659, 41.867405, 1,41400,ORANGE,8);
		createStation(db,"Roosevelt", 30081, "Roosevelt/Wabash (Midway-63rd-bound)","S",-87.62659, 41.867405, 1,41400,ORANGE,8);
		createStation(db,"State/Lake", 30050, "State/Lake (Inner Loop)","E",-87.627835, 41.88574, 0,40260,ORANGE,14);
		createStation(db,"State/Lake", 30051, "State/Lake (Outer Loop)","W",-87.627835, 41.88574, 0,40260,ORANGE,14);
		createStation(db,"Washington/Wells", 30141, "Washington/Wells (Inner Loop)","N",-87.63378, 41.882695, 1,40730,ORANGE,12);
		createStation(db,"Washington/Wells", 30142, "Washington/Wells (Outer Loop)","S",-87.63378, 41.882695, 1,40730,ORANGE,12);
		createStation(db,"Western", 30060, "Western (Loop-bound)","N",-87.684019, 41.804546, 1,40310,ORANGE,4);
		createStation(db,"Western", 30061, "Western (Midway-bound)","S",-87.684019, 41.804546, 1,40310,ORANGE,4);
	}
	
	/**
	 * Create in the database, the data regarding the Brown Line 
	 * @param db
	 */

	private static void createStationBrownLine(SQLiteDatabase db) {
		createStation(db,"Adams/Wabash", 30132, "Adams/Wabash (Inner Loop)","S",-87.626037, 41.879507, 0,40680,BROWN,24);
		createStation(db,"Adams/Wabash", 30131, "Adams/Wabash (Outer Loop)","N",-87.626037, 41.879507, 0,40680,BROWN,24);
		createStation(db,"Addison", 30277, "Addison (Kimball-bound)","N",-87.674642, 41.947028, 1,41440,BROWN,9);
		createStation(db,"Addison", 30278, "Addison (Loop-bound)","S",-87.674642, 41.947028, 1,41440,BROWN,9);
		createStation(db,"Armitage", 30127, "Armitage (Kimball-Linden-bound)","N",-87.652644, 41.918217, 1,40660,BROWN,16);
		createStation(db,"Armitage", 30128, "Armitage (Loop-bound)","S",-87.652644, 41.918217, 1,40660,BROWN,16);
		createStation(db,"Belmont", 30256, "Belmont (Loop-bound)","S",-87.65338, 41.939751, 1,41320,BROWN,12);
		createStation(db,"Belmont", 30255, "Belmont (Kimball-Linden-bound)","N",-87.65338, 41.939751, 1,41320,BROWN,12);
		createStation(db,"Chicago", 30137, "Chicago/Franklin (Kimball-Linden-bound)","N",-87.635924, 41.89681, 1,40710,BROWN,18);
		createStation(db,"Chicago", 30138, "Chicago/Franklin (Loop-bound)","S",-87.635924, 41.89681, 1,40710,BROWN,18);
		createStation(db,"Clark/Lake", 30074, "Clark/Lake (Inner Loop)","E",-87.630886, 41.885737, 1,40380,BROWN,28);
		createStation(db,"Clark/Lake", 30075, "Clark/Lake (Outer Loop)","W",-87.630886, 41.885737, 1,40380,BROWN,28);
		createStation(db,"Damen", 30018, "Damen (Kimball-bound)","N",-87.678639, 41.966286, 1,40090,BROWN,6);
		createStation(db,"Damen", 30019, "Damen (Loop-bound)","S",-87.678639, 41.966286, 1,40090,BROWN,6);
		createStation(db,"Diversey", 30103, "Diversey (Kimball-Linden-bound)","N",-87.653131, 41.932732, 1,40530,BROWN,14);
		createStation(db,"Diversey", 30104, "Diversey (Loop-bound)","S",-87.653131, 41.932732, 1,40530,BROWN,14);
		createStation(db,"Francisco", 30167, "Francisco (Kimball-bound)","N",-87.701644, 41.966046, 1,40870,BROWN,3);
		createStation(db,"Francisco", 30168, "Francisco (Loop-bound)","S",-87.701644, 41.966046, 1,40870,BROWN,3);
		createStation(db,"Fullerton", 30235, "Fullerton (Kimball-Linden-bound)","N",-87.652866, 41.925051, 1,41220,BROWN,15);
		createStation(db,"Fullerton", 30236, "Fullerton (Loop-bound)","S",-87.652866, 41.925051, 1,41220,BROWN,15);
		createStation(db,"Harold Washington Library-State/Van Buren", 30166, "Library (Inner Loop)","W",-87.628196, 41.876862, 1,40850,BROWN,23);
		createStation(db,"Harold Washington Library-State/Van Buren", 30165, "Library (Outer Loop)","E",-87.628196, 41.876862, 1,40850,BROWN,23);
		createStation(db,"Irving Park", 30281, "Irving Park (Kimball-bound)","N",-87.674868, 41.954521, 1,41460,BROWN,8);
		createStation(db,"Irving Park", 30282, "Irving Park (Loop-bound)","S",-87.674868, 41.954521, 1,41460,BROWN,8);
		createStation(db,"Kedzie", 30225, "Kedzie (Kimball-bound)","N",-87.708821, 41.965996, 1,41180,BROWN,2);
		createStation(db,"Kedzie", 30226, "Kedzie (Loop-bound)","S",-87.708821, 41.965996, 1,41180,BROWN,2);
		createStation(db,"Kimball", 30250, "Kimball (Loop-bound)","S",-87.713065, 41.967901, 1,41290,BROWN,1);
		createStation(db,"Kimball", 30249, "Kimball (Terminal arrival)","N",-87.713065, 41.967901, 1,41290,BROWN,1);
		createStation(db,"LaSalle/Van Buren", 30031, "LaSalle/Van Buren (Inner Loop)","W",-87.631739, 41.8768, 0,40160,BROWN,22);
		createStation(db,"LaSalle/Van Buren", 30030, "LaSalle/Van Buren (Outer Loop)","E",-87.631739, 41.8768, 0,40160,BROWN,22);
		createStation(db,"Madison/Wabash", 30124, "Madison/Wabash (Inner Loop)","S",-87.626098, 41.882023, 0,40640,BROWN,25);
		createStation(db,"Madison/Wabash", 30123, "Madison/Wabash (Outer Loop)","N",-87.626098, 41.882023, 0,40640,BROWN,25);
		createStation(db,"Merchandise Mart", 30090, "Merchandise Mart (Kimball-Linden-bound)","N",-87.633924, 41.888969, 1,40460,BROWN,19);
		createStation(db,"Merchandise Mart", 30091, "Merchandise Mart (Loop-bound)","S",-87.633924, 41.888969, 1,40460,BROWN,19);
		createStation(db,"Montrose", 30287, "Montrose (Kimball-bound)","N",-87.675047, 41.961756, 1,41500,BROWN,7);
		createStation(db,"Montrose", 30288, "Montrose (Loop-bound)","S",-87.675047, 41.961756, 1,41500,BROWN,7);
		createStation(db,"Paulina", 30253, "Paulina (Kimball-bound)","N",-87.670907, 41.943623, 1,41310,BROWN,10);
		createStation(db,"Paulina", 30254, "Paulina (Loop-bound)","S",-87.670907, 41.943623, 1,41310,BROWN,10);
		createStation(db,"Quincy/Wells", 30007, "Quincy/Wells (Inner Loop)","N",-87.63374, 41.878723, 0,40040,BROWN,21);
		createStation(db,"Quincy/Wells", 30008, "Quincy/Wells (Outer Loop)","S",-87.63374, 41.878723, 0,40040,BROWN,21);
		createStation(db,"Randolph/Wabash", 30039, "Randolph/Wabash (Inner Loop)","S",-87.626149, 41.884431, 0,40200,BROWN,26);
		createStation(db,"Randolph/Wabash", 30038, "Randolph/Wabash (Outer Loop)","N",-87.626149, 41.884431, 0,40200,BROWN,26);
		createStation(db,"Rockwell", 30195, "Rockwell (Kimball-bound)","N",-87.6941, 41.966115, 1,41010,BROWN,4);
		createStation(db,"Rockwell", 30196, "Rockwell (Loop-bound)","S",-87.6941, 41.966115, 1,41010,BROWN,4);
		createStation(db,"Sedgwick", 30155, "Sedgwick (Kimball-Linden-bound)","N",-87.639302, 41.910409, 1,40800,BROWN,17);
		createStation(db,"Sedgwick", 30156, "Sedgwick (Loop-bound)","S",-87.639302, 41.910409, 1,40800,BROWN,17);
		createStation(db,"Southport", 30070, "Southport (Kimball-bound)","N",-87.663619, 41.943744, 1,40360,BROWN,11);
		createStation(db,"Southport", 30071, "Southport (Loop-bound)","S",-87.663619, 41.943744, 1,40360,BROWN,11);
		createStation(db,"State/Lake", 30050, "State/Lake (Inner Loop)","E",-87.627835, 41.88574, 0,40260,BROWN,27);
		createStation(db,"State/Lake", 30051, "State/Lake (Outer Loop)","W",-87.627835, 41.88574, 0,40260,BROWN,27);
		createStation(db,"Washington/Wells", 30141, "Washington/Wells (Inner Loop)","N",-87.63378, 41.882695, 1,40730,BROWN,20);
		createStation(db,"Washington/Wells", 30142, "Washington/Wells (Outer Loop)","S",-87.63378, 41.882695, 1,40730,BROWN,20);
		createStation(db,"Wellington", 30231, "Wellington (Kimball-Linden-bound)","N",-87.653266, 41.936033, 1,41210,BROWN,13);
		createStation(db,"Wellington", 30232, "Wellington (Loop-bound)","S",-87.653266, 41.936033, 1,41210,BROWN,13);
		createStation(db,"Western", 30283, "Western (Kimball-bound)","N",-87.688502, 41.966163, 1,41480,BROWN,5);
		createStation(db,"Western", 30284, "Western (Loop-bound)","S",-87.688502, 41.966163, 1,41480,BROWN,5);
	}

	
	/**
	 * Create in the database, the data regarding the Green Line 
	 * @param db
	 */
	private static void createStationGreenLine(SQLiteDatabase db) {
		createStation(db, "35th-Bronzeville-IIT", 30214, "35-Bronzeville-IIT (63rd-bound)", "S", -87.625826, 41.831677, 1, 41120, GREEN,21);
		createStation(db, "35th-Bronzeville-IIT", 30213, "35-Bronzeville-IIT (Harlem-bound", "N", -87.625826, 41.831677, 1, 41120, GREEN,21);
		createStation(db, "43rd", 30246, "43rd (63rd-bound)", "S", -87.619021, 41.816462, 1, 41270, GREEN,23);
		createStation(db, "43rd", 30245, "43rd (Harlem-bound)", "N", -87.619021, 41.816462, 1, 41270, GREEN,23);
		createStation(db, "47th", 30210, "47th (63rd-bound) Elevated (63rd-bound)", "S", -87.618826, 41.809209, 1, 41080, GREEN,24);
		createStation(db, "47th", 30209, "47th-Dan Ryan (95th-bound)", "N", -87.618826, 41.809209, 1, 41080, GREEN,24);
		createStation(db, "51st", 30025, "51st (63rd-bound)", "S", -87.61848, 41.80209, 1, 40130, GREEN,25);
		createStation(db, "51st", 30024, "51st (Harlem-bound)", "N", -87.61848, 41.80209, 1, 40130, GREEN,25);
		createStation(db,"Adams/Wabash", 30132, "Adams/Wabash (Inner Loop)","S",-87.626037, 41.879507, 0,40680,GREEN,19);
		createStation(db,"Adams/Wabash", 30131, "Adams/Wabash (Outer Loop)","N",-87.626037, 41.879507, 0,40680,GREEN,19);
		createStation(db,"Ashland", 30032, "Ashland (Harlem-54th/Cermak-bound)","E",-87.666969, 41.885269, 1,40170,GREEN,12);
		createStation(db,"Ashland", 30033, "Ashland (Loop-63rd-bound)","W",-87.666969, 41.885269, 1,40170,GREEN,12);
		createStation(db,"Ashland/63rd", 30056, "Ashland/63rd (Harlem-bound)","E",-87.663766, 41.77886, 1,40290,GREEN,30);
		createStation(db,"Ashland/63rd", 30057, "Ashland/63rd (Terminal arrival)","W",-87.663766, 41.77886, 1,40290,GREEN,30);
		createStation(db,"Austin", 30243, "Austin (63rd-bound)","E",-87.774135, 41.887293, 0,41260,GREEN,4);
		createStation(db,"Austin", 30244, "Austin (Harlem-bound)","W",-87.774135, 41.887293, 0,41260,GREEN,4);
		createStation(db,"California", 30265, "California (63rd-bound)","E",-87.696234, 41.88422, 1,41360,GREEN,11);
		createStation(db,"California", 30266, "California (Harlem-bound)","W",-87.696234, 41.88422, 1,41360,GREEN,11);
		createStation(db,"Central", 30054, "Central (63rd-bound)","E",-87.76565, 41.887389, 1,40280,GREEN,5);
		createStation(db,"Central", 30055, "Central (Harlem-bound)","W",-87.76565, 41.887389, 1,40280,GREEN,5);
		createStation(db,"Cicero", 30094, "Cicero (63rd-bound)","E",-87.744698, 41.886519, 1,40480,GREEN,7);
		createStation(db,"Cicero", 30009, "Cicero (Harlem-bound)","W",-87.744698, 41.886519, 1,40480,GREEN,7);
		createStation(db,"Clark/Lake", 30074, "Clark/Lake (Forest Pk-bound)","S",-87.630886, 41.885737, 1,40380,GREEN,15);
		createStation(db,"Clark/Lake", 30075, "Clark/Lake (O'Hare-bound)","N",-87.630886, 41.885737, 1,40380,GREEN,15);
		createStation(db,"Clinton", 30222, "Clinton (Harlem-54th/Cermak-bound)","W",-87.641782, 41.885678, 1,41160,GREEN,14);
		createStation(db,"Clinton", 30221, "Clinton (Loop-63rd-bound)","E",-87.641782, 41.885678, 1,41160,GREEN,14);
		createStation(db,"Conservatory", 30291, "Conservatory (63rd-bound)","E",-87.716523, 41.884904, 1,41670,GREEN,9);
		createStation(db,"Conservatory", 30292, "Conservatory (Harlem-bound)","W",-87.716523, 41.884904, 1,41670,GREEN,9);
		createStation(db,"Cottage Grove", 30139, "Cottage Grove (Terminal arrival)","E",-87.605857, 41.780309, 1,40720,GREEN,28);
		createStation(db,"Cottage Grove", 30140, "East 63rd-Cottage Grove (Harlem-bound)","W",-87.605857, 41.780309, 1,40720,GREEN,28);
		createStation(db,"Garfield", 30100, "Garfield (63rd-bound)","S",-87.618327, 41.795172, 1,40510,GREEN,26);
		createStation(db,"Garfield", 30099, "Garfield (Harlem-bound)","N",-87.618327, 41.795172, 1,40510,GREEN,26);
		createStation(db,"Halsted", 30184, "Halsted/63rd (Ashland-bound)","W",-87.644244, 41.778943, 1,40940,GREEN,29);
		createStation(db,"Halsted", 30183, "Halsted/63rd (Harlem-bound)","E",-87.644244, 41.778943, 1,40940,GREEN,29);
		createStation(db,"Harlem/Lake", 30004, "Harlem (Terminal arrival)","W",-87.803176, 41.886848, 1,40020,GREEN,1);
		createStation(db,"Harlem/Lake", 30003, "Harlem (63rd-bound)","E",-87.803176, 41.886848, 1,40020,GREEN,1);
		createStation(db,"Indiana", 30059, "Indiana (63rd-bound)","S",-87.621371, 41.821732, 1,40300,GREEN,22);
		createStation(db,"Indiana", 30058, "Indiana (Harlem-bound)","N",-87.621371, 41.821732, 1,40300,GREEN,22);
		createStation(db,"Kedzie", 30207, "Kedzie (63rd-bound)","E",-87.706155, 41.884321, 1,41070,GREEN,10);
		createStation(db,"Kedzie", 30208, "Kedzie (Harlem-bound)","W",-87.706155, 41.884321, 1,41070,GREEN,10);
		createStation(db,"King Drive", 30217, "King Drive (Cottage Grove-bound)","E",-87.615546, 41.78013, 1,41140,GREEN,27);
		createStation(db,"King Drive", 30218, "King Drive (Harlem-bound)","W",-87.615546, 41.78013, 1,41140,GREEN,27);
		createStation(db,"Laramie", 30135, "Laramie (63rd-bound)","E",-87.754986, 41.887163, 1,40700,GREEN,6);
		createStation(db,"Laramie", 30136, "Laramie (Harlem-bound)","W",-87.754986, 41.887163, 1,40700,GREEN,6);
		createStation(db,"Madison/Wabash", 30124, "Madison/Wabash (Inner Loop)","S",-87.626098, 41.882023, 0,40640,GREEN,18);
		createStation(db,"Madison/Wabash", 30123, "Madison/Wabash (Outer Loop)","N",-87.626098, 41.882023, 0,40640,GREEN,18);
		createStation(db,"Morgan", 30296, "Morgan (Harlem-54th/Cermak-bound)","W",-87.652193, 41.885586, 1,41510,GREEN,13);
		createStation(db,"Morgan", 30295, "Morgan (Loop-63rd-bound)","E",-87.652193, 41.885586, 1,41510,GREEN,13);
		createStation(db,"Oak Park", 30263, "Oak Park (63rd-bound)","E",-87.793783, 41.886988, 0,41350,GREEN,2);
		createStation(db,"Oak Park", 30264, "Oak Park (Harlem-bound)","W",-87.793783, 41.886988, 0,41350,GREEN,2);
		createStation(db,"Pulaski", 30005, "Pulaski (63rd-bound)","E",-87.725404, 41.885412, 1,40030,GREEN,8);
		createStation(db,"Pulaski", 30006, "Pulaski (Harlem-bound)","W",-87.725404, 41.885412, 1,40030,GREEN,8);
		createStation(db,"Ridgeland", 30119, "Ridgeland (63rd-bound)","E",-87.783661, 41.887159, 0,40610,GREEN,3);
		createStation(db,"Ridgeland", 30120, "Ridgeland (Harlem-bound)","W",-87.783661, 41.887159, 0,40610,GREEN,3);
		createStation(db,"State/Lake", 30050, "State/Lake (Inner Loop)","E",-87.627835, 41.88574, 0,40260,GREEN,16);
		createStation(db,"State/Lake", 30051, "State/Lake (Outer Loop)","W",-87.627835, 41.88574, 0,40260,GREEN,16);
		createStation(db,"Randolph/Wabash", 30039, "Randolph/Wabash (Inner Loop)","S",-87.626149, 41.884431, 0,40200,GREEN,17);
		createStation(db,"Randolph/Wabash", 30038, "Randolph/Wabash (Outer Loop)","N",-87.626149, 41.884431, 0,40200,GREEN,17);
		createStation(db,"Roosevelt", 30080, "Roosevelt/Wabash (Loop-Harlem-bound)","N",-87.62659, 41.867405, 1,41400,GREEN,20);
		createStation(db,"Roosevelt", 30081, "Roosevelt/Wabash (Midway-63rd-bound)","S",-87.62659, 41.867405, 1,41400,GREEN,20);
	}
	
	/**
	 * Create in the database, the data regarding the Blue Line 
	 * @param db
	 */

	private static void createStationBlueLine(SQLiteDatabase db) {
		createStation(db,"Addison", 30240, "Addison (O'Hare Branch)(Forest Pk-bound)","S",-87.71906, 41.94738, 0,41240,BLUE,8);
		createStation(db,"Addison", 30239, "Addison (O'Hare Branch)(O'Hare-bound)","N",-87.71906, 41.94738, 0,41240,BLUE,8);
		createStation(db,"Austin", 30002, "Austin (Forest Pk-bound)","W",-87.776812, 41.870851, 0,40010,BLUE,30);
		createStation(db,"Austin", 30001, "Austin (O'Hare-bound)","E",-87.776812, 41.870851, 0,40010,BLUE,30);
		createStation(db,"Belmont", 30013, "Belmont (O'Hare Branch)(Forest Pk-bound)","S",-87.712359, 41.938132, 0,40060,BLUE,9);
		createStation(db,"Belmont", 30012, "Belmont (O'Hare Branch)(O'Hare-bound)","N",-87.712359, 41.938132, 0,40060,BLUE,9);
		createStation(db,"California", 30112, "California/Milwaukee (Forest Pk-bound)","S",-87.69689, 41.921939, 0,40570,BLUE,11);
		createStation(db,"California", 30111, "California/Milwaukee (O'Hare-bound)","N",-87.69689, 41.921939, 0,40570,BLUE,11);
		createStation(db,"Chicago", 30272, "Chicago/Milwaukee (Forest Pk-bound)","S",-87.655214, 41.896075, 0,41410,BLUE,15);
		createStation(db,"Chicago", 30271, "Chicago/Milwaukee (O'Hare-bound)","N",-87.655214, 41.896075, 0,41410,BLUE,15);
		createStation(db,"Cicero", 30188, "Cicero (Forest Pk-bound)","W",-87.745154, 41.871574, 0,40970,BLUE,29);
		createStation(db,"Cicero", 30187, "Cicero (O'Hare-bound)","E",-87.745154, 41.871574, 0,40970,BLUE,29);
		createStation(db,"Clark/Lake", 30374, "Clark/Lake (Forest Pk-bound)","S",-87.630886, 41.885737, 1,40380,BLUE,17);
		createStation(db,"Clark/Lake", 30375, "Clark/Lake (O'Hare-bound)","N",-87.630886, 41.885737, 1,40380,BLUE,17);
		createStation(db,"Clinton", 30085, "Clinton (Forest Pk-bound)","W",-87.640984, 41.875539, 0,40430,BLUE,22);
		createStation(db,"Clinton", 30084, "Clinton (O'Hare-bound)","E",-87.640984, 41.875539, 0,40430,BLUE,22);
		createStation(db,"Cumberland", 30045, "Cumberland (Forest Pk-bound)","S",-87.838028, 41.984246, 1,40230,BLUE,3);
		createStation(db,"Cumberland", 30044, "Cumberland (O'Hare-bound)","N",-87.838028, 41.984246, 1,40230,BLUE,3);
		createStation(db,"Damen", 30116, "Damen/Milwaukee (Forest Pk-bound)","S",-87.677437, 41.909744, 0,40590,BLUE,13);
		createStation(db,"Damen", 30115, "Damen/Milwaukee (O'Hare-bound)","N",-87.677437, 41.909744, 0,40590,BLUE,13);
		createStation(db,"Division", 30063, "Division/Milwaukee (Forest Pk-bound)","S",-87.666496, 41.903355, 0,40320,BLUE,14);
		createStation(db,"Division", 30062, "Division/Milwaukee (O'Hare-bound)","N",-87.666496, 41.903355, 0,40320,BLUE,14);
		createStation(db,"Forest Park", 30076, "Forest Park (O'Hare-bound)","E",-87.817318, 41.874257, 1,40390,BLUE,33);
		createStation(db,"Forest Park", 30077, "Forest Park (Terminal Arrival)","W",-87.817318, 41.874257, 1,40390,BLUE,33);
		createStation(db,"Grand", 30096, "Grand/Milwaukee (Forest Pk-bound)","S",-87.647578, 41.891189, 0,40490,BLUE,16);
		createStation(db,"Grand", 30095, "Grand/Milwaukee (O'Hare-bound)","N",-87.647578, 41.891189, 0,40490,BLUE,16);
		createStation(db,"Harlem", 30190, "Harlem (Forest Pk-bound)","W",-87.806961, 41.87349, 0,40980,BLUE,32);
		createStation(db,"Harlem", 30189, "Harlem (O'Hare-bound)","E",-87.806961, 41.87349, 0,40980,BLUE,32);
		createStation(db,"Harlem", 30146, "Harlem (O'Hare Branch)(Forest Pk-bound)","S",-87.8089, 41.98227, 1,40750,BLUE,4);
		createStation(db,"Harlem", 30145, "Harlem (O'Hare Branch)(O'Hare-bound)","N",-87.8089, 41.98227, 1,40750,BLUE,4);
		createStation(db,"Illinois Medical District", 30158, "Illinois Medical District (Forest Pk-bound)","W",-87.673932, 41.875706, 1,40810,BLUE,25);
		createStation(db,"Illinois Medical District", 30157, "Illinois Medical District (O'Hare-bound)","E",-87.673932, 41.875706, 1,40810,BLUE,25);
		createStation(db,"Irving Park", 30108, "Irving Park (O'Hare Branch)(Forest Pk-bound)","S",-87.729229, 41.952925, 0,40550,BLUE,7);
		createStation(db,"Irving Park", 30107, "Irving Park (O'Hare Branch)(O'Hare-bound)","N",-87.729229, 41.952925, 0,40550,BLUE,7);
		createStation(db,"Jackson", 30015, "Jackson/Dearborn (Forest Pk-bound)","S",-87.629296, 41.878183, 1,40070,BLUE,20);
		createStation(db,"Jackson", 30014, "Jackson/Dearborn (O'Hare-bound)","N",-87.629296, 41.878183, 1,40070,BLUE,20);
		createStation(db,"Jefferson Park", 30248, "Jefferson Park (Forest Pk-bound)","S",-87.760892, 41.970634, 1,41280,BLUE,5);
		createStation(db,"Jefferson Park", 30247, "Jefferson Park (O'Hare-bound)","N",-87.760892, 41.970634, 1,41280,BLUE,5);
		createStation(db,"Kedzie-Homan", 30049, "Kedzie-Homan (Forest Pk-bound)","W",-87.70604, 41.874341, 1,40250,BLUE,27);
		createStation(db,"Kedzie-Homan", 30048, "Kedzie-Homan (O'Hare-bound)","E",-87.70604, 41.874341, 1,40250,BLUE,27);
		createStation(db,"LaSalle", 30262, "LaSalle (Forest Pk-bound)","W",-87.631722, 41.875568, 0,41340,BLUE,21);
		createStation(db,"LaSalle", 30261, "LaSalle (O'Hare-bound)","E",-87.631722, 41.875568, 0,41340,BLUE,21);
		createStation(db,"Logan Square", 30198, "Logan Square (Forest Pk-bound)","S",-87.708541, 41.929728, 1,41020,BLUE,10);
		createStation(db,"Logan Square", 30197, "Logan Square (O'Hare-bound)","N",-87.708541, 41.929728, 1,41020,BLUE,10);
		createStation(db,"Monroe", 30154, "Monroe/Dearborn (Forest Pk-bound)","S",-87.629378, 41.880703, 0,40790,BLUE,19);
		createStation(db,"Monroe", 30153, "Monroe/Dearborn (O'Hare-bound)","N",-87.629378, 41.880703, 0,40790,BLUE,19);
		createStation(db,"Montrose", 30260, "Montrose (Forest Pk-bound)","S",-87.743574, 41.961539, 0,41330,BLUE,6);
		createStation(db,"Montrose", 30259, "Montrose (O'Hare-bound)","N",-87.743574, 41.961539, 0,41330,BLUE,6);
		createStation(db,"O'Hare", 30172, "O'Hare Airport (Forest Pk-bound)","S",-87.90422307, 41.97766526, 1,40890,BLUE,1);
		createStation(db,"O'Hare", 30171, "O'Hare Airport (Terminal Arrival)","N",-87.90422307, 41.97766526, 1,40890,BLUE,1);
		createStation(db,"Pulaski", 30180, "Pulaski (Forest Pk-bound)","W",-87.725663, 41.873797, 0,40920,BLUE,28);
		createStation(db,"Pulaski", 30179, "Pulaski (O'Hare-bound)","E",-87.725663, 41.873797, 0,40920,BLUE,28);
		createStation(db,"Racine", 30093, "Racine (Forest Pk-bound)","W",-87.659458, 41.87592, 0,40470,BLUE,24);
		createStation(db,"Racine", 30092, "Racine (O'Hare-bound)","E",-87.659458, 41.87592, 0,40470,BLUE,24);
		createStation(db,"Rosemont", 30160, "Rosemont (Forest Pk-bound)","S",-87.859388, 41.983507, 1,40820,BLUE,2);
		createStation(db,"Rosemont", 30159, "Rosemont (O'Hare-bound)","N",-87.859388, 41.983507, 1,40820,BLUE,2);
		createStation(db,"UIC-Halsted", 30069, "UIC-Halsted (Forest Pk-bound)","W",-87.649707, 41.875474, 1,40350,BLUE,23);
		createStation(db,"UIC-Halsted", 30068, "UIC-Halsted (O'Hare-bound)","E",-87.649707, 41.875474, 1,40350,BLUE,23);
		createStation(db,"Washington", 30073, "Washington/Dearborn (Forest Pk-bound)","S",-87.62944, 41.883164, 0,40370,BLUE,18);
		createStation(db,"Washington", 30072, "Washington/Dearborn (O'Hare-bound)","N",-87.62944, 41.883164, 0,40370,BLUE,18);
		createStation(db,"Western", 30043, "Western (Forest Pk-bound)","W",-87.688436, 41.875478, 0,40220,BLUE,26);
		createStation(db,"Western", 30042, "Western (O'Hare-bound)","E",-87.688436, 41.875478, 0,40220,BLUE,26);
		createStation(db,"Western", 30130, "Western/Milwaukee (Forest Pk-bound)","S",-87.687364, 41.916157, 1,40670,BLUE,12);
		createStation(db,"Western", 30129, "Western/Milwaukee (O'Hare-bound)","N",-87.687364, 41.916157, 1,40670,BLUE,12);
		createStation(db,"Oak Park", 30035, "Oak Park (Forest Pk-bound)", "W", -87.791602,41.872108, 1, 40180, BLUE, 31);
		createStation(db,"Oak Park", 30034, "Oak Park (O'Hare-bound)", "W", -87.791602,41.872108, 1, 40180, BLUE, 31);
	}
	
	/**
	 * Create in the database, the data regarding the Red Line 
	 * @param db
	 */
	private static void createStationRedLine(SQLiteDatabase db) {
		createStation(db, "47th", 30238, "47th-Dan Ryan (95th-bound)", "S", -87.63094, 41.810318, 1, 41230, RED,27);
		createStation(db, "47th", 30237, "47th-Dan Ryan (Howard-bound)", "N", -87.63094, 41.810318, 1, 41230, RED,27);
		createStation(db, "63rd", 30178, "63rd-Dan Ryan (95th-bound)", "S", -87.630952, 41.780536, 0, 40910, RED,29);
		createStation(db, "63rd", 30177, "63rd-Dan Ryan (Howard-bound)", "N", -87.630952, 41.780536, 0, 40910, RED,29);
		createStation(db, "69th", 30192, "69th (95th-bound)", "S", -87.625724, 41.768367, 1, 40990, RED,30);
		createStation(db, "69th", 30191, "69th (Howard-bound)", "N", -87.625724, 41.768367, 1, 40990, RED,30);
		createStation(db, "79th", 30047, "79th (95th-bound)", "S", -87.625112, 41.750419, 1, 40240, RED,31);
		createStation(db, "79th", 30046, "79th (Howard-bound)", "N", -87.625112, 41.750419, 1, 40240, RED,31);
		createStation(db, "87th", 30276, "87th (95th-bound)", "S", -87.624717, 41.735372, 0, 41430,	RED,32);
		createStation(db, "87th", 30275, "87th (Howard-bound)", "N", -87.624717, 41.735372, 0, 41430, RED,32);
		createStation(db,"95th/Dan Ryan", 30089, "95th/Dan Ryan (95th-bound)","S",-87.624342, 41.722377, 1,40450,RED,33);
		createStation(db,"95th/Ran Ryan", 30088, "95th/Dan Ryan (Howard-bound)","N",-87.624342, 41.722377, 1,40450,RED,33);
		createStation(db,"Addison", 30274, "Addison (95th-bound)","S",-87.653626, 41.947428, 1,41420,RED,13);
		createStation(db,"Addison", 30273, "Addison (Howard-bound)","N",-87.653626, 41.947428, 1,41420,RED,13);
		createStation(db,"Argyle", 30230, "Argyle (95th-bound)","S",-87.65853, 41.973453, 0,41200,RED,9);
		createStation(db,"Argyle", 30229, "Argyle (Howard-bound)","N",-87.65853, 41.973453, 0,41200,RED,9);
		createStation(db,"Belmont", 30256, "Belmont (95th-bound)","S",-87.65338, 41.939751, 1,41320,RED,14);
		createStation(db,"Belmont", 30255, "Belmont (Howard-bound)","N",-87.65338, 41.939751, 1,41320,RED,14);
		createStation(db,"Berwyn", 30067, "Berwyn (95th-bound)","S",-87.658668, 41.977984, 0,40340,RED,8);
		createStation(db,"Berwyn", 30066, "Berwyn (Howard-bound)","N",-87.658668, 41.977984, 0,40340,RED,8);
		createStation(db,"Bryn Mawr", 30268, "Bryn Mawr (95th-bound)","S",-87.65884, 41.983504, 0,41380,RED,7);
		createStation(db,"Bryn Mawr", 30267, "Bryn Mawr (Howard-bound)","N",-87.65884, 41.983504, 0,41380,RED,7);
		createStation(db,"Cermak-Chinatown", 30194, "Cermak-Chinatown (95th-bound)","S",-87.630968, 41.853206, 1,41000,RED,25);
		createStation(db,"Cermak-Chinatown", 30193, "Cermak-Chinatown (Howard-bound)","N",-87.630968, 41.853206, 1,41000,RED,25);
		createStation(db,"Chicago", 30280, "Chicago/State (95th-bound)","S",-87.628176, 41.896671, 1,41450,RED,18);
		createStation(db,"Chicago", 30279, "Chicago/State (Howard-bound)","N",-87.628176, 41.896671, 1,41450,RED,18);
		createStation(db,"Clark/Division", 30122, "Clark/Division (95th-bound)","S",-87.631412, 41.90392, 0,40630,RED,17);
		createStation(db,"Clark/Division", 30121, "Clark/Division (Howard-bound)","N",-87.631412, 41.90392, 0,40630,RED,17);
		createStation(db,"Fullerton", 30234, "Fullerton (95th-bound)","S",-87.652866, 41.925051, 1,41220,RED,15);
		createStation(db,"Fullerton", 30233, "Fullerton (Howard-bound)","N",-87.652866, 41.925051, 1,41220,RED,15);
		createStation(db,"Garfield", 30224, "Garfield-Dan Ryan (95th-bound)","S",-87.631157, 41.79542, 0,41170,RED,28);
		createStation(db,"Garfield", 30223, "Garfield-Dan Ryan (Howard-bound)","N",-87.631157, 41.79542, 0,41170,RED,28);
		createStation(db,"Grand", 30065, "Grand/State (95th-bound)","S",-87.628021, 41.891665, 1,40330,RED,19);
		createStation(db,"Grand", 30064, "Grand/State (Howard-bound)","N",-87.628021, 41.891665, 1,40330,RED,19);
		createStation(db,"Granville", 30148, "Granville (95th-bound)","S",-87.659202, 41.993664, 1,40760,RED,5);
		createStation(db,"Granville", 30147, "Granville (Howard-bound)","N",-87.659202, 41.993664, 1,40760,RED,5);
		createStation(db,"Harrison", 30286, "Harrison (95th-bound)","S",-87.627479, 41.874039, 0,41490,RED,23);
		createStation(db,"Harrison", 30285, "Harrison (Howard-bound)","N",-87.627479, 41.874039, 0,41490,RED,23);
		createStation(db,"Howard", 30173, "Howard (Terminal arrival)","N",-87.672892, 42.019063, 1,40900,RED,1);
		createStation(db,"Howard", 30174, "Howard (95th-Bound)","S",-87.672892, 42.019063, 1,40900,RED,1);
		createStation(db,"Jackson", 30110, "Jackson/State (95th-bound)","S",-87.627596, 41.878153, 1,40560,RED,22);
		createStation(db,"Jackson", 30109, "Jackson/State (Howard-bound)","N",-87.627596, 41.878153, 1,40560,RED,22);
		createStation(db,"Jarvis", 30228, "Jarvis (95th-bound)","S",-87.669092, 42.015876, 0,41190,RED,2);
		createStation(db,"Jarvis", 30227, "Jarvis (Howard-bound)","N",-87.669092, 42.015876, 0,41190,RED,2);
		createStation(db,"Lake", 30290, "Lake/State (95th-bound)","S",-87.627813, 41.884809, 1,41660,RED,20);
		createStation(db,"Lake", 30289, "Lake/State (Howard-bound)","N",-87.627813, 41.884809, 1,41660,RED,20);
		createStation(db,"Lawrence", 30150, "Lawrence (95th-bound)","S",-87.658493, 41.969139, 0,40770,RED,10);
		createStation(db,"Lawrence", 30149, "Lawrence (Howard-bound)","N",-87.658493, 41.969139, 0,40770,RED,10);
		createStation(db,"Loyola", 30252, "Loyola (95th-bound)","S",-87.661061, 42.001073, 1,41300,RED,4);
		createStation(db,"Loyola", 30251, "Loyola (Howard-bound)","N",-87.661061, 42.001073, 1,41300,RED,4);
		createStation(db,"Monroe", 30212, "Monroe/State (95th-bound)","S",-87.627696, 41.880745, 0,41090,RED,21);
		createStation(db,"Monroe", 30211, "Monroe/State (Howard-bound)","N",-87.627696, 41.880745, 0,41090,RED,21);
		createStation(db,"Morse", 30021, "Morse (95th-bound)","S",-87.665909, 42.008362, 0,40100,RED,3);
		createStation(db,"Morse", 30020, "Morse (Howard-bound)","N",-87.665909, 42.008362, 0,40100,RED,3);
		createStation(db,"North/Clybourn", 30126, "North/Clybourn (95th-bound)","S",-87.649177, 41.910655, 0,40650,RED,16);
		createStation(db,"North/Clybourn", 30125, "North/Clybourn (Howard-bound)","N",-87.649177, 41.910655, 0,40650,RED,16);
		createStation(db,"Roosevelt", 30269, "Roosevelt/State (Howard-bound)","N",-87.627402, 41.867368, 1,41400,RED,24);
		createStation(db,"Roosevelt", 30270, "Roosevelt/State (Howard-bound)","S",-87.627402, 41.867368, 1,41400,RED,24);
		createStation(db,"Sheridan", 30017, "Sheridan (95th-bound)","S",-87.654929, 41.953775, 0,40080,RED,12);
		createStation(db,"Sheridan", 30016, "Sheridan (Howard-bound)","N",-87.654929, 41.953775, 0,40080,RED,12);
		createStation(db,"Sox-35th", 30037, "Sox-35th (95th-bound)","S",-87.630636, 41.831191, 1,40190,RED,26);
		createStation(db,"Sox-35th", 30036, "Sox-35th (Howard-bound)","N",-87.630636, 41.831191, 1,40190,RED,26);
		createStation(db,"Thorndale", 30170, "Thorndale (95th-bound)","S",-87.659076, 41.990259, 0,40880,RED,6);
		createStation(db,"Thorndale", 30169, "Thorndale (Howard-bound)","N",-87.659076, 41.990259, 0,40880,RED,6);
		createStation(db,"Wilson", 30106, "Wilson (95th-bound)","S",-87.657588, 41.964273, 0,40540,RED,11);
		createStation(db,"Wilson", 30105, "Wilson (Howard-bound)","N",-87.657588, 41.964273, 0,40540,RED,11);
	}
	
}
